Ext.define("Dict.view.article.EditWindow", {
	extend : "Ext.window.Window",
	alias : "articleeditwindow",
	requires : ["Dict.view.article.Edit"],
	// controllers : [ "Dict.controller.Article" ],
	modal : true,
	layout : "fit",
	resizable : false,
	closable : true,
	plain : true,
	xtype : "container",
	width : 300,
	height : 250,
	items : [{
		xtype : "articleedit",
	}],
	tools : [],

	initTools : function() {
		var me = this;
		if(me.closable) {
			me.addClsWithUI("closable");
			me.addTool({
				type : "close",
				handler : Ext.Function.bind(me.headerClose, this, [])
			});
		}
	},
	headerClose : function() {
		console.log("EditWindow.close");
		if(this.fireEvent("beforeclose", this) !== false) {
			this.fireEvent("headerclose", this);
			this.doClose();
			console.log("EditWindow.close doClose");
		}
		console.log("EditWindow.close complete");
	}
});
